﻿
@{
    ViewBag.Title = "ConstructionAdd";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}

@section css {
    <link href="~/Assets/css/lib/bootstrap-select.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/bootstrap-datetimepicker.min.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/fileinput.css" rel="stylesheet" />
    <style>

        #location {
            position: absolute;
            z-index: 100;
            width: 10px;
            height: 10px;
            color: red;
            font-weight: bold;
        }

        .div-relative {
            position: relative;
        }

        .div-a {
            position: absolute;
        }

        .table tr td {
            border: none;
        }
    </style>
}

<div class="page-content" ng-cloak ng-controller="SafetyCertificateController" ng-init="
     page='@(Request.QueryString["page"].IsEmpty() ? "1" : Request.QueryString["page"])';
      Id='@(Request.QueryString["Id"].IsEmpty() ? "" : Request.QueryString["Id"])';
     GetJobCertificateDetail(Id);
     ">

    <div class="load" ng-show="Submiting">
        <div class="loader">
            <svg version="1.1" id="loader-1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
            <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite" />
			</path>
		</svg>
            <div class="load-msg">正在提交...</div>
        </div>
    </div>
    <div class="page-heading">
        <h1>从业资证详细</h1>
        <div class="options">
            <div class="btn-toolbar">

            </div>
        </div>
    </div>
    <ol class="breadcrumb">
        <li><a>主页</a></li>
        <li><a>安全培训</a></li>
        <li class="active"><a>从业资证详细</a></li>
    </ol>
    <form id="HiddenTroubleForm" class="form-horizontal row-border">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-inverse">
                        <div class="panel-heading"><h2>从业资证详细</h2></div>
                        <div class="panel-body">
                            <div class="form-group">
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>所属部门：</label>
                                <div class="col-sm-4">
                                    <input class="form-control" type="text" ng-model="DataModel.DepartmentName" readonly/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>姓名-工号：</label>
                                <div class="col-sm-4">
                                    <input class="form-control" type="text" value="{{DataModel.UserInfo.UserName+'-'+DataModel.UserInfo.UserNo}}" readonly/>
                                </div>
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>身份证：</label>
                                <div class="col-sm-4">
                                    <input class="form-control" type="text" ng-model="DataModel.IdCardNo"readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>职务：</label>
                                <div class="col-sm-4">
                                    <input class="form-control" type="text" ng-model="DataModel.JobTitle"readonly />
                                </div>
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>资质类型：</label>
                                <div class="col-sm-4">
                                    <input class="form-control" type="text" ng-model="DataModel.Type" readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>持证类别：</label>
                                <div class="col-sm-4">
                                    <input class="form-control" type="text" ng-model="DataModel.CertificateType " readonly/>
                                </div>

                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>发证机构：</label>
                                <div class="col-sm-4">
                                    <input class="form-control" type="text" ng-model="DataModel.PublishCompany " readonly/>
                                </div>
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>证书编号：</label>
                                <div class="col-sm-4">
                                    <input class="form-control" type="text" ng-model="DataModel.CertificateNo " readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>证书有效期：</label>
                                <div class="col-sm-2">
                                    <input id="StartTime" class="form-control" value="{{DataModel.StartDate | JSONDate:'yyyy-MM-dd'}}" readonly/>
                                </div>
                                <div class="col-sm-2">
                                    <input id="StartTime" class="form-control" value="{{DataModel.EndDate | JSONDate:'yyyy-MM-dd'}}" readonly />
                                </div>
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>复审日期：</label>
                                <div class="col-sm-2">
                                    <input id="StartTime" class="form-control" value="{{DataModel.CheckDate | JSONDate:'yyyy-MM-dd'}}" readonly />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>是否安排培训：</label>
                                <div class="col-sm-4">
                                    <label class="radio-inline">
                                        <input type="radio" id="inlineradio2" ng-checked="DataModel.IsTraining==true;" disabled name="istraining">是
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" id="IsTemporary" ng-checked="DataModel.IsTraining==false;" disabled name="istraining"> 否
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label"><b style="color:red;"></b>附件：</label>
                                <div class="col-sm-8">
                                    <table class="table table-striped table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <th style="width:5%">序号</th>
                                                <th style="width:30%">文件名称</th>
                                                <th style="width:10%">文件大小(kb)</th>
                                                <th style="width:10%">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr ng-show="DataModel.FileList.length==0">
                                                <td colspan="4" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                                            </tr>
                                            <tr ng-repeat="x in DataModel.FileList">
                                                <td ng-bind="$index+1"></td>
                                                <td ng-bind="x.FileName"></td>
                                                <td ng-bind="x.FileSize"></td>
                                                <td>
                                                    <a href="../Download/DownloadFile?FileId={{x.FileId}}" class="btn btn-success btn-xs btn-label"><i class="fa fa-download"></i>下载</a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <div class="col-sm-6 col-sm-offset-2" ng-show="@ViewBag.IsAdd">
                            <a class="btn-warning btn" href="JobCertificatePageList?page={{page}}">返回</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

@section Js{
    <script src="~/Assets/js/pg/SafetyCertificate.js?v=@DateTime.Now.ToString("yyyyMMddHHmm")"></script>
    <script src="~/Assets/js/libs/moment.min.js"></script>
    <script src="~/Assets/js/libs/locales/date/zh-cn.js"></script>
    <script src="~/Assets/js/libs/bootstrap-datetimepicker.min.js"></script>
    <script src="~/Assets/js/libs/angularjs-datepicker.js"></script>
    <script src="~/Assets/js/libs/fileinput.js"></script>
    <script src="~/Assets/js/libs/zh.js"></script>
    <script>
        $('#docfiles').fileinput({
            language: 'zh'
        });
        $("#mapContent").mousedown(function (e) {
            var width = $("#mapContent").width();
            var height = $("#mapContent").height();
            mouseX1 = (e.pageX - $("#mapContent").offset().left) / width;
            mouseY1 = (e.pageY - $("#mapContent").offset().top) / height;
            $("#location").css({ 'left': mouseX1 * 100 + '%', 'top': mouseY1 * 100 + '%' });
            $("#h_XAxis").val(mouseX1);
            $("#h_YAxis").val(mouseY1);
        });

        $("#sel_workerlist").selectpicker({
            noneSelectedText: "选择作业人"
        });
        $("#placelist").selectpicker({
            noneSelectedText: "选择场所"
        });
        $("#caretakerlist").selectpicker({
            noneSelectedText: "选择监护人"
        });
    </script>
}